package value

import "fmt"

type TqtRank struct {
	RankFrom int        `json:"rankFrom" header:"开始名次" validate:"gt=0"`
	RankTo   int        `json:"rankTo" header:"结束名次" validate:"gte=-1"`
	Award    []TqtAward `json:"award" header:"奖励内容" validate:"gt=0,dive"`
}

type SvrRank struct {
	RankFrom int        `json:"rank_from"`
	RankTo   int        `json:"rank_to"`
	Award    []SvrAward `json:"award"`
}

func (rank TqtRank) GetRankKey() string {
	return fmt.Sprintf("%d_%d", rank.RankFrom, rank.RankTo)
}
